package com.meirengu.webview.controller;

import com.meirengu.common.StatusCode;
import com.meirengu.model.Result;
import com.meirengu.webview.service.KwChannelDataService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("kwChannelData")
public class KwChannelDataController extends BaseController {

    private static final Logger logger = LoggerFactory.getLogger(KwChannelDataController.class);
    @Autowired
    private KwChannelDataService kwChannelDataService;


    @RequestMapping(method = RequestMethod.GET)
    @ResponseBody
    public Result detail(@RequestParam(value = "data_date", required = false) String dataDate) {

        kwChannelDataService.getMDZJData(dataDate);
        return setResult(StatusCode.OK, "", StatusCode.codeMsgMap.get(StatusCode.OK));
    }

}
